home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
dbx.z
/
dbx
Wrap
Text File
|
1998-10-30
|
41KB
|
894 lines
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
NNNNAAAAMMMMEEEE
dbx - a source-level debugger
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ddddbbbbxxxx dbx-options [[[[object-file]]]] [[[[core-file]]]]
ddddbbbbxxxx dbx-options ----pppp pid
ddddbbbbxxxx dbx-options ----PPPP name
ddddbbbbxxxx dbx-options ----rrrr [[[[object-file]]]] [[[[arguments . . .]]]]
dbx-options: [[[[----IIII directory ]]]] [[[[ ----cccc file ]]]] [[[[ ----eeee evalsizelimit ]]]] [[[[ ----iiii ]]]] [[[[ ----kkkk ]]]] [[[[ ----NNNN ]]]] [[[[ ----xxxx ]]]]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_d_b_x is a source-level debugger that allows the user to trace the
execution of a given _o_b_j_e_c_t-_f_i_l_e as well as a pool of arbitrary
processes. _d_b_x works with _c_c(1), _f_7_7(1), _p_c(1) _a_s(1), _C_C(1), and MIPS
machine code on 32- and 64-bit ELF _o_b_j_e_c_t-_f_i_l_es.
The _o_b_j_e_c_t-_f_i_l_e used with the debugger is produced by specifying an
appropriate option (usually ----gggg) to the compiler (and linking the
resulting object(s), creating an executable _o_b_j_e_c_t-_f_i_l_e). The resulting
_o_b_j_e_c_t-_f_i_l_e contains debugging information, including the names of all
source files that the compiler translated to create the _o_b_j_e_c_t-_f_i_l_e.
These source files are accessible from the debugger.
If a _c_o_r_e-_f_i_l_e is specified, or if the file _c_o_r_e exists in the current
directory, _d_b_x can be used to look at the state of the program when it
faulted.
The file /_u_s_r/_l_i_b/_d_b_x._h_e_l_p is a text file explaining features of _d_b_x.
Read it for additional information on assembler-level debugging,
expressions in _d_b_x, and examples.
This man page shows only some of the dbx commands: See the help file and
the appropriate reference manual for details and for information on
additional features.
RRRRuuuunnnnnnnniiiinnnngggg ddddbbbbxxxx
If a ._d_b_x_i_n_i_t file resides in the current directory or in the user's home
directory, the commands in it are executed when _d_b_x is invoked.
The environment variable DDDDBBBBXXXXIIIINNNNIIIITTTT may be used to hold dbx command line
options. If present, the contents of DDDDBBBBXXXXIIIINNNNIIIITTTT are inserted before the
command line options.
When invoked, _d_b_x recognizes these command line options:
PPPPaaaaggggeeee 1111
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
----IIII _d_i_r_e_c_t_o_r_y
Tells _d_b_x to look in the specified directory for source files.
Multiple directories can be specified by using multiple ----IIII
options. _d_b_x searches for source files in the current directory
and in the _o_b_j_e_c_t-_f_i_l_e's directory whether or not ----IIII is used.
----cccc _f_i_l_e Selects a command file other than ._d_b_x_i_n_i_t.
----iiii Uses interactive mode. This option does not treat #s as comments
in a file. It prompts for source even when it reads from a file.
With this option, _d_b_x also has extra formatting as if for a
terminal.
----pppp _p_i_d Debug the running process with the specified process id.
----PPPP _n_a_m_e Debug the running process with the specified name (_n_a_m_e as shown
in _p_s(1)).
----RRRR Turn on $debugrld at startup, so one can set breakpoints in
_r_l_d(1).
----rrrr Runs the _o_b_j_e_c_t-_f_i_l_e immediately. Arguments may be placed on the
_d_b_x command line. The ._d_b_x_i_n_i_t file (if any) is read in and the
commands in it executed after the _o_b_j_e_c_t-_f_i_l_e is run.
----eeee nnnnnnnnnnnnnnnn Choose a larger size for the evaluation space. Printing a very
large structure one can exhaust the default 20,000 bytes of
evaluation space. With this option you can make the space as
large as desired. For example, to make the stack 100,000 bytes:
-e 100000
----kkkk Debug the operating system. When debugging a running system,
/_d_e_v/_k_m_e_m should be specified as the _c_o_r_e-_f_i_l_e.
----NNNN Sets the dbx variable $nonstop to 1 on startup. When $nonstop is
1, any process attached to is left running rather than stopped.
So, for example ddddbbbbxxxx ----NNNN ----pppp 11112222333344445555 will start up dbx and attach to
process 12345 but will leave the process running.
TTTThhhheeee MMMMoooonnnniiiittttoooorrrr
The following commands control the _d_b_x monitor. Multiple commands can be
specified on the same command line by separating them with a semicolon
(;).
!!!![_s_t_r_i_n_g] [_i_n_t_e_g_e_r] [-_i_n_t_e_g_e_r]
Specifies a command from the history list.
PPPPaaaaggggeeee 2222
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
hhhheeeellllpppp Prints a short list of _d_b_x help topics and suggests some uses of
the help command.
hhhhiiiissssttttoooorrrryyyy Prints the items from the history list. The history list is
$_l_i_n_e_s lines long (20 by default).
hhhheeeedddd _i_n_t Brings the history list line into an editor in a temporary file.
Whatever commands are still in the editor temporary file when you
quit the editor are executed as ordinary dbx commands.
qqqquuuuiiiitttt Exits _d_b_x.
CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg ddddbbbbxxxx
aaaalllliiiiaaaassss Lists all existing aliases.
aaaalllliiiiaaaassss _n_a_m_e
Lists the alias string for _n_a_m_e. The alias value is inserted in
quotes with escape characters added to show how the alias
""""_s_t_r_i_n_g"""" was typed. See the help file (/_u_s_r/_l_i_b/_d_b_x._h_e_l_p)
EEEEXXXXPPPPRRRREEEESSSSSSSSIIIIOOOONNNNSSSS section for additional information on strings and
character escapes.
aaaalllliiiiaaaassss _n_a_m_e _n_a_m_e_2
Defines a new alias.
uuuunnnnaaaalllliiiiaaaassss _a_l_i_a_s__n_a_m_e
Removes the alias _a_l_i_a_s__n_a_m_e from the alias table.
ddddeeeelllleeeetttteeee _e_x_p_r_e_s_s_i_o_n_1, ..._e_x_p_r_e_s_s_i_o_n_N
Deletes the specified item(s) from the status list.
ggggiiiivvvveeeennnnffffiiiilllleeee
Reports the name of the current _g_i_v_e_n_f_i_l_e (usually called an
_o_b_j_e_c_t-_f_i_l_e on this page).
ggggiiiivvvveeeennnnffffiiiilllleeee _o_b_j_e_c_t-_f_i_l_e
The argument _o_b_j_e_c_t-_f_i_l_e is taken as the name of the file to
debug, just as if _o_b_j_e_c_t-_f_i_l_e had been given on the _d_b_x command
line. Existing processes are killed and _d_b_x looks up the symbol
table and _c_o_r_e-_f_i_l_e for this _o_b_j_e_c_t-_f_i_l_e.
ccccoooorrrreeeeffffiiiilllleeee
Reports the current _c_o_r_e-_f_i_l_e name and whether data referencing
commands actually reference the _c_o_r_e-_f_i_l_e or not. They will not
reference the _c_o_r_e-_f_i_l_e if it is missing or damaged or if the
process is running.
ccccoooorrrreeeeffffiiiilllleeee _c_o_r_e-_f_i_l_e
The argument _c_o_r_e-_f_i_l_e is taken as the name of a _c_o_r_e-_f_i_l_e to
debug, just as if _c_o_r_e-_f_i_l_e had been given on the _d_b_x command
line. References to the process will use this _c_o_r_e-_f_i_l_e.
PPPPaaaaggggeeee 3333
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
ppppllllaaaayyyybbbbaaaacccckkkk iiiinnnnppppuuuutttt [_f_i_l_e]
Reads the commands in the file and executes them.
sssshhhh Calls a shell from _d_b_x. If the environment variable SSSSHHHHEEEELLLLLLLL is
set, its value is taken as the name of the shell to use. If
SSSSHHHHEEEELLLLLLLL is not set, _c_s_h(1) is used.
sssshhhh _s_h_e_l_l _c_o_m_m_a_n_d
Executes a shell command.
ssssttttaaaattttuuuussss Lists currently set ssssttttoooopppp, ttttrrrraaaacccceeee, and wwwwhhhheeeennnn commands.
sssseeeetttt Lists existing debugger variables and their values.
sssseeeetttt _v_a_r_i_a_b_l_e = _e_x_p_r_e_s_s_i_o_n
Assigns a new value to an existing variable or a new variable.
If the expression result is not of type ``int'' the sssseeeetttt command
will leave the result symbolic. To get the expression fully
evaluated, cast the result to ``int'' as in sssseeeetttt _v_a_r_i_a_b_l_e =
((((iiiinnnntttt))))_e_x_p_r_e_s_s_i_o_n.
uuuunnnnsssseeeetttt _v_a_r_i_a_b_l_e
Removes the specified debugger variable and its value from the
debugger variable table.
EEEExxxxaaaammmmiiiinnnniiiinnnngggg SSSSoooouuuurrrrcccceeee
////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n
Searches ahead in the source code for the regular expression.
????_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n
Searches back in the source code for the regular expression.
ddddiiiirrrreeeeccccttttoooorrrryyyy
Lists source directories. Abbreviate as ddddiiiirrrr.
ddddiiiirrrreeeeccccttttoooorrrryyyy _d_i_r_e_c_t_o_r_y_1 ... _d_i_r_e_c_t_o_r_y_N
Adds the new directory(s) to the previous list. Can be
abbreviated ddddiiiirrrr. See also uuuusssseeee.
eeeeddddiiiitttt Calls an editor on the current file from _d_b_x.
eeeeddddiiiitttt _f_i_l_e
Calls an editor from _d_b_x.
eeeeddddiiiitttt _f_u_n_c
Calls an editor on the file in which function _f_u_n_c is defined.
ffffiiiilllleeee Prints the current file name.
PPPPaaaaggggeeee 4444
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
ffffiiiilllleeee _f_i_l_e
Changes the current file to the specified file.
lllliiiisssstttt _e_x_p_r_e_s_s_i_o_n
Lists $_l_i_s_t_w_i_n_d_o_w lines starting at line _e_x_p_r_e_s_s_i_o_n.
lllliiiisssstttt _e_x_p_r_e_s_s_i_o_n,_e_x_p_r_e_s_s_i_o_n_2
Lists lines _e_x_p_r_e_s_s_i_o_n thru _e_x_p_r_e_s_s_i_o_n_2.
uuuusssseeee Lists source directories.
uuuusssseeee _d_i_r_e_c_t_o_r_y_1 ... _d_i_r_e_c_t_o_r_y_N
Substitutes the new directories for the previous list. See also
ddddiiiirrrreeeeccccttttoooorrrryyyy.
wwwwhhhhaaaattttiiiissss _v_a_r_i_a_b_l_e
Prints a type declaration. _v_a_r_i_a_b_l_e may be a variable or a type.
wwwwhhhhiiiicccchhhh _v_a_r_i_a_b_l_e
Finds the variable name currently being used.
wwwwhhhheeeerrrreeeeiiiissss _v_a_r_i_a_b_l_e
Prints all qualifications (scopes) of the specified variable
name.
CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg PPPPrrrrooooggggrrrraaaammmmssss
aaaassssssssiiiiggggnnnn _e_x_p_r_e_s_s_i_o_n_1 = _e_x_p_r_e_s_s_i_o_n_2
Assigns the specified expression to a specified program variable.
If the _i_n_c_o_m_p_a_t_i_b_l_e _t_y_p_e_s message appears when you try to assign
a value to a pointer, use casts to make the assignment work.
Example: assign x = 12
ccccoooonnnntttt Resume execution and wait for a break or other event.
ccccoooonnnntttt _s_i_g_n_a_l
Send signal _s_i_g_n_a_l to the process, resume execution, and wait for
a break or other event. For further information about signals
see the Execution Tracing section ccccaaaattttcccchhhh and iiiiggggnnnnoooorrrreeee commands and
discussion.
kkkkiiiillllllll _p_i_d ...
Kill the active process(es) whose process id(s) are specified.
nnnneeeexxxxtttt [_i_n_t_e_g_e_r]
Step over the specified number of lines. The default is one.
This command does not step into procedures. Breakpoints in
procedures stepped over are honored. See $_n_e_x_t_b_r_e_a_k and
$_s_t_e_p_i_n_t_o_a_l_l for information on modifying the behavior of nnnneeeexxxxtttt.
pppprrrriiiinnnntttteeeennnnvvvv [_e_n_v-_v_a_r-_n_a_m_e]
prints the environment variable named in the environment internal
to dbx. With no environment variable named, prints the names and
PPPPaaaaggggeeee 5555
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
values of the all the environment variables in the environment
internal to dbx. See sssseeeetttteeeennnnvvvv below.
rrrreeeerrrruuuunnnn [_a_r_g_1 ... _a_r_g_N]
Rerun the program, using the same arguments that were specified
to the rrrruuuunnnn command. If new arguments are specified, rrrreeeerrrruuuunnnn uses
those arguments. Any redirection or other features supported by
your shell may be used.
rrrreeeessssuuuummmmeeee Resume execution of the program, and return immediately to the
_d_b_x command interpreter.
rrrreeeessssuuuummmmeeee _s_i_g_n_a_l
Resume execution of the process, sending it signal _s_i_g_n_a_l, and
return immediately to the _d_b_x command interpreter.
rrrruuuunnnn [_a_r_g_1 ... _a_r_g_N] [< _f_i_l_e_1] [> _f_i_l_e_2]
Runs the program with the specified arguments.
rrrreeeettttuuuurrrrnnnn Continue execution until control returns to the next procedure up
the activation stack.
sssseeeetttteeeennnnvvvv _e_n_v-_v_a_r-_n_a_m_e _v_a_l_u_e
Sets the environment internal to dbx to have this environment
variable. Just like the _c_s_h(1) command, but does not affect the
_d_b_x startup since _d_b_x has already started up before one enters
this command. Primarily useful for setting environment variables
used by the application or by _r_l_d(1) before rrrruuuunnnn or rrrreeeerrrruuuunnnn of the
application being debugged.
sssstttteeeepppp [_i_n_t_e_g_e_r]
Step the specified number of lines. The default is one line.
Breakpoints in procedures stepped over are honored.
ssssyyyyssssccccaaaallllllll Prints the list of system calls in 4 sections. System calls may
be caught (breakpointed) at the time the call is made or when the
system call is about to return. This command prints the system
calls in the four sections: 1) caught at call 2) ignored at call
3) caught at return 4) ignored at return. The system calls are
all listed in /_u_s_r/_i_n_c_l_u_d_e/_s_y_s._s
ssssyyyyssssccccaaaallllllll ccccaaaattttcccchhhh ccccaaaallllllll _s_y_s_c_a_l_l ...
The named system calls breakpoint at the entry of the system
call.
ssssyyyyssssccccaaaallllllll iiiiggggnnnnoooorrrreeee ccccaaaallllllll _s_y_s_c_a_l_l ...
The named system calls not breakpoint at the entry of the system
call.
ssssyyyyssssccccaaaallllllll ccccaaaattttcccchhhh rrrreeeettttuuuurrrrnnnn _s_y_s_c_a_l_l ...
The named system calls breakpoint at the return from the system
call.
PPPPaaaaggggeeee 6666
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
ssssyyyyssssccccaaaallllllll iiiiggggnnnnoooorrrreeee rrrreeeettttuuuurrrrnnnn _s_y_s_c_a_l_l ...
The named system calls not breakpoint at the return from the
system call.
uuuunnnnsssseeeetttteeeennnnvvvv _e_n_v-_v_a_r-_n_a_m_e
Unsets (removes) the environment variable in the environment
internal to dbx. See sssseeeetttteeeennnnvvvv above.
EEEExxxxeeeeccccuuuuttttiiiioooonnnn ttttrrrraaaacccciiiinnnngggg
ccccaaaattttcccchhhh Lists all signals that _d_b_x catches.
ccccaaaattttcccchhhh _s_i_g_n_a_l
Adds a new signal to the catch list. A _s_i_g_n_a_l is specified as a
name or as a number. For example, the interrupt signal is named
INT, SIGINT, or 2.
iiiiggggnnnnoooorrrreeee Lists all signals that _d_b_x does not catch.
iiiiggggnnnnoooorrrreeee _s_i_g_n_a_l
Adds a signal _s_i_g_n_a_l to the ignore list. A _s_i_g_n_a_l is specified
as a name or as a number. For example, the interrupt signal is
named INT, SIGINT, or 2. A process sees this signal when
directed at it by itself or another process. The process
responds to the signal just as if _d_b_x were not present.
ssssttttoooopppp _v_a_r_i_a_b_l_e
Sets up to stop execution when _v_a_r_i_a_b_l_e changes.
ssssttttoooopppp iiiinnnn _p_r_o_c_e_d_u_r_e
Sets up to stop execution when _p_r_o_c_e_d_u_r_e is entered.
ssssttttoooopppp aaaatttt _l_i_n_e
Sets a breakpoint at the specified source line.
ttttrrrraaaacccceeee prints information about the process when the trace conditions are
satisfied, but program execution continues.
ttttrrrraaaacccceeee _v_a_r_i_a_b_l_e
When _v_a_r_i_a_b_l_e changes, print its old and new values. (Execution
will be very slow).
ttttrrrraaaacccceeee _p_r_o_c_e_d_u_r_e
When _p_r_o_c_e_d_u_r_e is entered, print its arguments and its caller's
name.
wwwwhhhheeeennnn is similar to ssssttttoooopppp except that rather than stopping when the
conditions are met, the _c_o_m_m_a_n_d-_l_i_s_t (_d_b_x commands separated by semi-
colons) is executed. If one of the commands in the list is ssssttttoooopppp (with no
PPPPaaaaggggeeee 7777
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
operands) then the process will stop when the _c_o_m_m_a_n_d-_l_i_s_t is executed.
wwwwhhhheeeennnn aaaatttt _l_i_n_e {{{{ _c_o_m_m_a_n_d-_l_i_s_t }}}}
Execute the specified _c_o_m_m_a_n_d-_l_i_s_t when the conditions are met.
wwwwhhhheeeennnn iiiinnnn _p_r_o_c_e_d_u_r_e {{{{ _c_o_m_m_a_n_d-_l_i_s_t }}}}
Execute the specified _c_o_m_m_a_n_d-_l_i_s_t when the conditions are met.
EEEExxxxaaaammmmiiiinnnniiiinnnngggg PPPPrrrrooooggggrrrraaaammmm SSSSttttaaaatttteeee
dddduuuummmmpppp Prints variable information about the current procedure.
dddduuuummmmpppp .... Prints variable information for all procedures currently active.
ddddoooowwwwnnnn Moves down one activation level in the stack.
ddddoooowwwwnnnn _n Moves down the specified number of activation levels on the
stack.
uuuupppp Moves up one activation level on the stack.
uuuupppp _n Moves up the specified number of activation levels on the stack.
lllliiiissssttttoooobbbbjjjj Lists the a.out and all active DSOs and their text regions.
lllliiiissssttttrrrreeeeggggiiiioooonnnnssss
Lists all active memory regions which are part of the executing
program.
pppprrrriiiinnnntttt _e_x_p_r_e_s_s_i_o_n_1,..._e_x_p_r_e_s_s_i_o_n_N
Prints the value(s) of the specified expression(s). pppprrrriiiinnnnttttdddd,
pppprrrriiiinnnnttttoooo, pppprrrriiiinnnnttttxxxx similarly print the values, but in decimal, octal,
and hex (respectively)
pppprrrriiiinnnnttttrrrreeeeggggssss
Prints all register values.
wwwwhhhheeeerrrreeee Does a stack trace, showing the current activation levels.
wwwwhhhheeeerrrreeee _n Does a stack trace, showing the first _n activation levels.
DDDDeeeebbbbuuuuggggggggiiiinnnngggg aaaatttt tttthhhheeee MMMMaaaacccchhhhiiiinnnneeee LLLLeeeevvvveeeellll
ssssttttooooppppiiii, wwwwhhhheeeennnniiii, and ttttrrrraaaacccceeeeiiii have the same meanings and options as ssssttttoooopppp wwwwhhhheeeennnn,
and ttttrrrraaaacccceeee except that ssssttttooooppppiiii, wwwwhhhheeeennnniiii, and ttttrrrraaaacccceeeeiiii step in units of machine
instructions rather than source lines. A few of the possibilities
follow:
ccccoooonnnnttttiiii ttttoooo _a_d_d_r_e_s_s
Set a breakpoint at _a_d_d_r_e_s_s and continue.
PPPPaaaaggggeeee 8888
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
nnnneeeexxxxttttiiii [_i_n_t_e_g_e_r]
Steps over the specified number of machine instructions. The
default is one. This command does not step into procedures.
sssstttteeeeppppiiii [_i_n_t_e_g_e_r]
Steps the specified number of machine instructions. This command
steps into procedures even if no source, symbols, or line numbers
are present. The default is one instruction.
ssssttttooooppppiiii aaaatttt _a_d_d_r_e_s_s
Set a breakpoint at _a_d_d_r_e_s_s.
_a_d_d_r_e_s_s //// _c_o_u_n_t _f_o_r_m_a_t
Prints the contents of the specified address or disassembles the
code for the instruction at the specified address. Repeated for
a total of _c_o_u_n_t addresses in increasing address. This might
also be termed the ``examine forward'' command. With ???? instead
of //// it examines in decreasing address.
A partial list of command formats:
______________________________________________
format data size print
name in bits format
______________________________________________
D 32 signed decimal
dd 64 signed decimal
X 32 hexadecimal
xx 64 hexadecimal
V 32 unsigned decimal
vv 64 unsigned decimal
c 8 character
s string of characters
ending in null byte
f 32 single precision
real number
g 64 double precision
real number
i 32 instruction disassembly
______________________________________________
||||||||||||||||||
||||||||||||||||||
EEEExxxxaaaammmmpppplllleeee::::
$curpc-20/20i
prints 20 disassembled machine instructions starting at
the current pc-20.
Complicated address expressions require parentheses around the
address expression.
PPPPaaaaggggeeee 9999
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
EEEExxxxaaaammmmpppplllleeee::::
(0x400500 + (($a1>>3) &0xfff))/11
prints 11 64-bit words in hexadecimal starting at the
calculated address.
MMMMuuuullllttttiiiipppplllleeee pppprrrroooocccceeeessssssss ddddeeeebbbbuuuuggggggggiiiinnnngggg
If desired, a number of processes can be traced in a single _d_b_x session.
Processes can be added or subtracted from the ``process pool''. A single
process is identified as the ``active process'' and relevant commands
will be applied to this process' execution and address space.
If a process performs an _e_x_e_c_v() or an _e_x_e_c_v_e() system call, it will stop
itself and allow _d_b_x to read its new symbol information.
Many commands take a 'pid <pid> clause. Using the ppppiiiidddd _p_i_d clause means
you can apply a command to any process in the process pool even though it
is not the active process.
Example: step pid 3345
aaaaccccttttiiiivvvveeee Prints the active process's process id.
aaaaccccttttiiiivvvveeee _p_i_d
Make the process the active process.
sssshhhhoooowwwwpppprrrroooocccc
Print the status of all processes in the pool.
$_l_a_s_t_c_h_i_l_d is always set to the process id of the last child _f_o_r_ked.
$_p_i_d_0 is always set to the process id of the ggggiiiivvvveeeennnn process, (called
_o_b_j_e_c_t-_f_i_l_e in the Synopsis).
PPPPtttthhhhrrrreeeeaaaaddddssss DDDDeeeebbbbuuuuggggggggiiiinnnngggg FFFFaaaacccciiiilllliiiittttiiiieeeessss
The pthreads debugging facility allows one to see some things per thread.
The set of things one can do per thread is, as yet, limited to just the
wwwwhhhheeeerrrreeee command.
The intent is that one can do commands with the command modifiers tttthhhhrrrreeeeaaaadddd
<<<<tttthhhhrrrreeeeaaaadddd----iiiidddd>>>> or tttthhhhrrrreeeeaaaadddd aaaallllllll to see any (appropriate) command applied to a
particular thread or to all the threads. For example, to see the stack
trace for all pthreads, type where thread all .
With IRIX6.5 and later, one can control multiple processes, each with
multiple threads. The multiple processes can be in a Process Group
(discussed below) though the threads in each process are completely
separate from the threads in any other process in the group: each
process is independently pthreaded. In IRIX6.5 the showthread commands
and the "thread" command modifier apply to the active process.
PPPPaaaaggggeeee 11110000
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
With IRIX6.4 and earlier one can control only one set of threads (using
multiple processes). See the dbx help file for more information on
IRIX6.4 and earlier pthreads as it will not be discussed further here.
Commands unique to threads are:
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd
Prints basic information about the current thread.
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd <<<<nnnnuuuummmmbbbbeeeerrrr>>>>
Prints basic information about the thread with that number. A
typical example is _s_h_o_w_t_h_r_e_a_d _0_x_8_0_0_0_1 .
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd tttthhhhrrrreeeeaaaadddd <<<<nnnnuuuummmmbbbbeeeerrrr>>>>
Prints basic information about the thread with that number.
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd aaaallllllll
Prints basic information about all the threads.
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd tttthhhhrrrreeeeaaaadddd aaaallllllll
Prints basic information about all the threads.
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd ffffuuuullllllll
Prints full thread information about the current thread.
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd ffffuuuullllllll tttthhhhrrrreeeeaaaadddd <<<<nnnnuuuummmmbbbbeeeerrrr>>>>
Prints full thread information information about the thread with
that number.
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd ffffuuuullllllll aaaallllllll
Prints full thread information information about all threads.
PPPPrrrroooocccceeeessssssss GGGGrrrroooouuuupppp DDDDeeeebbbbuuuuggggggggiiiinnnngggg FFFFaaaacccciiiilllliiiittttiiiieeeessss
The process group facility allows a group of processes to be operated on
simultaneously by a single _d_b_x command. This is far more convenient to
use when dealing with _s_p_r_o_ced processes than issuing individual rrrreeeessssuuuummmmeeee,
ssssuuuussssppppeeeennnndddd, or breakpoint setting commands.
Whenever a process _s_p_r_o_cs, if the child is added to the process pool the
parent and child are added to the group list as well. The group list is
simply a list of processes.
aaaaddddddddppppggggrrrrpppp _p_i_d ...
Adds the process ids specified to the group list. Only processes
in the process pool can be added to the group list.
ddddeeeellllppppggggrrrrpppp _p_i_d ...
Deletes the process ids specified from the group list.
sssshhhhoooowwwwppppggggrrrrpppp
Shows the group process list and the group breakpoint list.
PPPPaaaaggggeeee 11111111
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
wwwwaaaaiiiittttaaaallllllll Wait for any process currently running to breakpoint or stop for
any reason. It waits on all running processes in the process
list, not just those in the group list. It does not make the
process that stops first the active process. Most useful after a
resume pgrp command.
HHHHIIIINNNNTTTTSSSS
The command help help shows how to get this entire help file into your
favorite editor so you can search for topics of interest. The help file
is far too large to use conveniently with _m_o_r_e(1).
sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd ffffuuuullllllll
PPPPrrrroooocccceeeessssssss GGGGrrrroooouuuupppp DDDDeeeebbbbuuuuggggggggiiiinnnngggg FFFFaaaacccciiiilllliiiittttiiiieeeessss
The process group facility allows a group of processes to be operated on
simultaneously by a single _d_b_x command. This is far more convenient to
use when dealing with _s_p_r_o_ced processes than issuing individual rrrreeeessssuuuummmmeeee,
ssssuuuussssppppeeeennnndddd, or breakpoint setting commands.
Whenever a process _s_p_r_o_cs, if the child is added to the process pool the
parent and child are added to the group list as well. The group list is
simply a list of processes.
aaaaddddddddppppggggrrrrpppp _p_i_d ...
Adds the process ids specified to the group list. Only processes
in the process pool can be added to the group list.
ddddeeeellllppppggggrrrrpppp _p_i_d ...
Deletes the process ids specified from the group list.
sssshhhhoooowwwwppppggggrrrrpppp
Shows the group process list and the group breakpoint list.
wwwwaaaaiiiittttaaaallllllll Wait for any process currently running to breakpoint or stop for
any reason. It waits on all running processes in the process
list, not just those in the group list. It does not make the
process that stops first the active process. Most useful after a
resume pgrp command.
HHHHIIIINNNNTTTTSSSS
The command help help shows how to get this entire help file into your
favorite editor so you can search for topics of interest. The help file
is far too large to use conveniently with _m_o_r_e(1).
_d_b_x can be used as a calculator, since constant calculations can be done
without specifying or running a program. A spelling error, like typing
oxf96 instead of 0xf96, will provoke the error message ``no active
process'' since _d_b_x presumes the oxf96 is a variable name. Example
session:
PPPPaaaaggggeeee 11112222
DDDDBBBBXXXX((((1111)))) DDDDBBBBXXXX((((1111))))
$ dbx
(dbx) px ( 0xa5a893a + 0xf96) << 2
0x296a6340
(dbx)q
To get emacs-style line editing on the dbx command line, set the
environment variable before starting dbx. LLLLIIIINNNNEEEEEEEEDDDDIIIITTTT. For example: setenv
LINEEDIT ""
CCCCAAAAVVVVEEEEAAAATTTTSSSS
When debugging an MP program, disable SIGTERM by doing the following:
(dbx) ignore TERM
Although debugging is possible without this command, the MP program may
not terminate gracefully after execution is complete. Disabling SIGTERM
is not necessary for non-MP programs.
For Fortran arrays (arrays defined in Fortran source) the Fortran syntax
of print x(1,2) works. _d_b_x also allows somewhat C-like syntax (using
"[]" not "()") for Fortran array references, meaning that if x _i_s _a _t_w_o-
_d_i_m_e_n_s_i_o_n _F_o_r_t_r_a_n _a_r_r_a_y _p_r_i_n_t _x[_1,_2] will also work. The x(1,2) notation
does not yet work in the duel command: one must use x[1,2] with the duel
command.
FFFFIIIILLLLEEEESSSS
/usr/bin/dbx
/usr/lib/dbxpcs
/usr/lib/dbx.help
SSSSEEEEEEEE AAAALLLLSSSSOOOO
dbxhang(1)
Compiling Debugging and Performance Tuning
/usr/lib/dbx.help
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
warning: /proc not mounted
This should not occur in normal operation. The debug "file system"
which provides _d_b_x with the ability to trace processes has been
unmounted. To re-mount this file system, perform the following
command as superuser (as described in mntproc(1M)):
/etc/mntproc
PPPPaaaaggggeeee 11113333